(: Para cada livro encontrado em bib.xml e reviews.xml, listar seu título e o preço de cada fonte :)
xquery version "1.0";
<books-with-prices>
{
    for $b in doc("bib.xml")/bib/book,
        $a in doc("reviews.xml")/reviews/entry
    where $b/title = $a/title
    return
        <book-with-prices>
            { $b/title }
            <price-bstore2>{ $a/price/text() }</price-bstore2>
            <price-bstore1>{ $b/price/text() }</price-bstore1>
        </book-with-prices>
 }
</books-with-prices>